﻿package chenji.moreitemfunapi.command;

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

import chenji.moreitemfunapi.command.help.helpPages.TextureHelpManager;

public class CommandMoreItemFun implements CommandExecutor {
	TextureHelpManager thm = new TextureHelpManager();

	@Override
	public boolean onCommand(CommandSender arg0, Command arg1, String arg2, String[] arg3) {
		Player p = (Player) arg0;
		String root = arg3[0];
		if (root.equalsIgnoreCase("texture")) {
			if (arg3.length == 1) {
				thm.sendTextureHelpPage(p);
				return true;
			}
			String subroot = arg3[1];
			if (subroot.equalsIgnoreCase("listall")) {
				if (arg3.length == 2) {
					this.thm.listAll(p, "a");
				}
			}
			if (subroot.equalsIgnoreCase("close")) {
				if (arg3.length == 2) {
					
				}
			}

		}
		p.sendMessage("无效的参数");
		return true;
	}

	public void item() {

	}

}
